<script setup lang="ts">
import useCountStore from "./pinia/countStore.ts";
import {storeToRefs} from "pinia";

const countStore = useCountStore()

const {count,maxCount} = storeToRefs(countStore)

const handleAdd = () => {
  countStore.changeCount()
}
</script>

<template>
  <span>count的值:{{ count }} 10倍后的count:{{ maxCount}}</span>
  <button @click="handleAdd">+1</button>
</template>

<style scoped>

</style>
